#include "cppjieba/Jieba.hpp"
#include <iostream>
using namespace std;
const char* const DICT_PATH = "./dict/jieba.dict.utf8";
const char* const HMM_PATH = "./dict/hmm_model.utf8";
const char* const USER_DICT_PATH = "./dict/user.dict.utf8";
const char* const IDF_PATH = "./dict/idf.utf8";
const char* const STOP_WORD_PATH = "./dict/stop_words.utf8";
int main(int argc, char** argv) {
    // 创建了一个jieba对象
    // jieba对象只构建一次，每次用的时候传指针
    cppjieba::Jieba jieba(DICT_PATH,
                          HMM_PATH,
                          USER_DICT_PATH,
                          IDF_PATH,
                          STOP_WORD_PATH);
    vector<string> words;
    string s;
    s  = "流派／学派既是文化／文明和文学艺术发展到一定阶段的产物，又是后者继续发展的伟大内驱力；既是其标志、旗帜和象征，又是其尺度；";
    //s = "他来到了网易杭研大厦";
    cout << s << endl;
    jieba.Cut(s, words, true);
    for(auto word:words){
        cout << "word = " << word << "\n";
    }
}
